# -*- coding;utf-8 -*-
"""
File name : QuestionImage.PY
Program IDE : PyCharm
Create file time: 2022/5/2 15:02
File Create By Author : 朱清闯
"""
import uuid
import os


def question_image_path(instance, filename):
    extension = filename.split('.')[-1]
    filename = '{}.{}'.format(uuid.uuid4().hex[:10], extension)
    return os.path.join(instance.id, 'images', filename)
